package club.haomoon.boss.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

@Data
@Schema(title = "用户Vo")
public class UserDataVo implements Serializable {

    private static final long serialVersionUID = 1L;

   @Schema(title  = "用户ID")
    private Integer id;

   @Schema(title  = "用户编码")
    private Integer sn;

   @Schema(title  = "用户头像")
    private String avatar;

   @Schema(title  = "真实姓名")
    private String realName;

   @Schema(title  = "用户昵称")
    private String nickname;

   @Schema(title  = "登录账号")
    private String account;

   @Schema(title  = "手机号码")
    private String mobile;

   @Schema(title  = "用户性别")
    private String sex;

   @Schema(title  = "注册渠道")
    private String channel;

   @Schema(title  = "最后登录IP")
    private String loginIp;

   @Schema(title  = "用户余额")
    private BigDecimal userMoney;

   @Schema(title  = "最后登录时间")
    private String loginTime;

   @Schema(title  = "创建时间")
    private String createTime;

    public void setSex(Integer sex) {
        switch (sex) {
            case 0:
                this.sex = "未知";
                break;
            case 1:
                this.sex = "男";
                break;
            case 2:
                this.sex = "女";
                break;
        }
    }

}
